-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce mintscript::SigntureOnlyChecker
and use it in the wallet
#1791
Conversation
3b6817e
to
0dbd42e
Compare
|
||
use super::{InputCheckError, InputCheckErrorPayload, PerInputData}; | ||
|
||
struct InputVerifyContextSignature<'a, T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very confusing name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a name in line with others like InputVerifyContextTimelock
pub struct SignatureOnlyReward; | ||
|
||
impl<C: SignatureInfoProvider> TranslateInput<C> for SignatureOnlyReward { | ||
fn translate_input(_ctx: &C) -> Result<WitnessScript, TranslationError> { | ||
// Not used anywhere. | ||
// But it's important to outline that if needed the reward implementation must be different | ||
// because staking/decommissioning destinations are not the same. | ||
unimplemented!() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keep it if it's unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to make it explicit for the future. So that noone tried to use implementation from transaction with reward (it might be a problem because both implement Transactable)
0dbd42e
to
a059999
Compare
9be918c
to
711ab1f
Compare
This PR addresses a problem that was introduced by HTLC change:
StandardInputSignature::raw_signature
can encode additional layer withAuthorizedHashedTimelockContractSpend
. Meaning thatcommon::StandardInputSignature::verify_signtaure
cannot be called directly andInputWitness
must be first evaluated with mintscript.mintscript::SignatureOnlyChecker
and public function intx_verifier::verify_tx_signature
PartiallySignedTransaction
to common and remove sig verification logic from insidePartiallySIgnedTransaction